package com.ruoyi.zsyh.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhFactoryBankcardsMapper;
import com.ruoyi.zsyh.domain.ZsyhFactoryBankcards;
import com.ruoyi.zsyh.service.IZsyhFactoryBankcardsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 厂家卡片管理Service业务层处理
 * 
 * @author yuexl
 * @date 2021-12-28
 */
@Service
public class ZsyhFactoryBankcardsServiceImpl implements IZsyhFactoryBankcardsService 
{
    @Autowired
    private ZsyhFactoryBankcardsMapper zsyhFactoryBankcardsMapper;

    /**
     * 查询厂家卡片管理
     * 
     * @param id 厂家卡片管理ID
     * @return 厂家卡片管理
     */
    @Override
    public ZsyhFactoryBankcards selectZsyhFactoryBankcardsById(String id)
    {
        return zsyhFactoryBankcardsMapper.selectZsyhFactoryBankcardsById(id);
    }

    /**
     * 查询厂家卡片管理列表
     * 
     * @param zsyhFactoryBankcards 厂家卡片管理
     * @return 厂家卡片管理
     */
    @Override
    public List<ZsyhFactoryBankcards> selectZsyhFactoryBankcardsList(ZsyhFactoryBankcards zsyhFactoryBankcards)
    {
        return zsyhFactoryBankcardsMapper.selectZsyhFactoryBankcardsList(zsyhFactoryBankcards);
    }

    /**
     * 新增厂家卡片管理
     * 
     * @param zsyhFactoryBankcards 厂家卡片管理
     * @return 结果
     */
    @Override
    public int insertZsyhFactoryBankcards(ZsyhFactoryBankcards zsyhFactoryBankcards)
    {
        zsyhFactoryBankcards.setCreateTime(DateUtils.getNowDate());
        return zsyhFactoryBankcardsMapper.insertZsyhFactoryBankcards(zsyhFactoryBankcards);
    }

    /**
     * 修改厂家卡片管理
     * 
     * @param zsyhFactoryBankcards 厂家卡片管理
     * @return 结果
     */
    @Override
    public int updateZsyhFactoryBankcards(ZsyhFactoryBankcards zsyhFactoryBankcards)
    {
        zsyhFactoryBankcards.setUpdateTime(DateUtils.getNowDate());
        return zsyhFactoryBankcardsMapper.updateZsyhFactoryBankcards(zsyhFactoryBankcards);
    }

    /**
     * 删除厂家卡片管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhFactoryBankcardsByIds(String ids)
    {
        return zsyhFactoryBankcardsMapper.deleteZsyhFactoryBankcardsByIds(Convert.toStrArray(ids));
    }

    public List<Map> selectZsyhFactoryBankType(){
        return zsyhFactoryBankcardsMapper.selectZsyhFactoryBankType();
    }

    /**
     * 删除厂家卡片管理信息
     * 
     * @param id 厂家卡片管理ID
     * @return 结果
     */
    @Override
    public int deleteZsyhFactoryBankcardsById(String id)
    {
        return zsyhFactoryBankcardsMapper.deleteZsyhFactoryBankcardsById(id);
    }
}
